<!--评价等次明细表-->
<template>
  <el-dialog :visible="visible" @close="close">
    <div class="divider"></div>
    <el-form
      :model="dataForm"
      ref="dataForm"
      class="dataForm"
      label-width="140px"
      style="width: 100%"
    >
      <el-form-item label="考核对象名称:" prop="name">
        <el-input v-model="dataForm.name" disabled></el-input>
      </el-form-item>
      <el-form-item label="奖金项列表:" prop="pmMc">
        <el-input v-model="dataForm.name" disabled></el-input>
      </el-form-item>
      <el-row :gutter="16">
        <el-col :span="12">
          <el-form-item label="事件类别:" prop="category">
            <el-input v-model="dataForm.eventCate" disabled></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="考核依据:" prop="basis">
            <el-input v-model="dataForm.name" disabled></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="16">
        <el-col :span="12">
          <el-form-item label="加扣分值:" prop="add">
            <el-input
              v-model="dataForm.score"
              placeholder="加扣分值"
              disabled
            ></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="加扣奖金:" prop="reduction">
            <el-input
              v-model="dataForm.salary"
              placeholder="加扣奖金"
              disabled
            ></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="16">
        <el-col :span="12">
          <el-form-item label="是否持续性扣罚:" prop="whether">
            <el-select
              v-model="dataForm.conti"
              placeholder="请选择奖考核依据"
              style="width: 100%"
              disabled
            >
              <el-option label="是" value="shanghai"></el-option>
              <el-option label="否" value="beijing"></el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="结束时间:" prop="date1">
            <el-date-picker
              type="date"
              value-format="yyyy-MM-dd"
              placeholder="选择日期"
              v-model="dataForm.endTime"
              style="width: 100%"
              disabled
            ></el-date-picker>
          </el-form-item>
        </el-col>
      </el-row>
      <el-form-item label="事件描述" prop="describe">
        <el-input
          type="textarea"
          placeholder="事件描述"
          v-model="dataForm.des"
          disabled
        ></el-input>
      </el-form-item>
    </el-form>
    <div class="divider"></div>
    <div>当月考核情况：</div>
    <el-row
      type="flex"
      justify="space-around"
      style="line-height: 40px; text-align: center"
    >
      <el-col :span="6">已扣分：-10分</el-col>
      <el-col :span="6">已扣罚金额：-200元</el-col>
    </el-row>
    <el-row
      type="flex"
      justify="space-around"
      style="line-height: 40px; text-align: center"
    >
      <el-col :span="6">已加分：20分</el-col>
      <el-col :span="6">已奖励金额：300元</el-col>
    </el-row>
  </el-dialog>
</template>

<script>
import { getById } from "@/api/assessment/event";

export default {
  props: {
    visible: false,
    id: null,
    module: "",
  },
  created() {
    getById({ id: this.id, module: this.module }).then((res) => {
      if (res.data.code == 0) {
        this.dataForm = res.data.data;
      }
    });
  },
  data() {
    return {
      dataForm: {},
    };
  },
  methods: {
    close() {
      this.$emit("close");
    },
  },
};
</script>
<style>
.divider {
  width: 100%;
  height: 1px;
  background: #797979;
  margin-bottom: 20px;
}
.dataForm .el-input--small .el-input__inner {
  height: 35px !important;
  line-height: 35px !important;
  border: 1px solid #ccccda;
  border-radius: 5px;
  background: linear-gradient(45deg, #f4f4fc, #f5f5f5);
  font-size: 16px;
  color: #303745;
  overflow: hidden;
}
</style>
